package com.sxy.tools;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 正则工具类
 *
 * @author shexi
 */
public class RegexUtils {

    private static final Logger LOG = LoggerFactory.getLogger(RegexUtils.class);

    /**
     * 判断是否科学计数法表示的数字
     *
     * @param number 字符串数字
     * @return true|false
     */
    public static boolean isScientificNotation(String number) {
        String regx = "^[-+]?\\d+(\\.\\d+)?([eE][-+]?\\d+)?$";
        LOG.info("获取传入的字符串数字:{}", number);
        return number.matches(regx);
    }
}
